<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="icon" href="#" />
</head>
<body>
	<h1>注册</h1>
	<form class="loginForm">
		<input type="text" name="username" id="username" placeholder="请输入用户名" /><br>
		<input type="text" name="password" id="password" placeholder="请输入密码" /><br>
		<input type="radio" checked="checked" name="gender" value="男">男
		<input type="radio" name="gender" value="女">女<br> <input
			type="text" placeholder="请输入手机号码" name="phone" lay-verify="phone"
			id="phone"><br> <input type="text" name="email"
			placeholder="请输入邮箱" lay-verify="email" id="email" /><br> <input
			type="text" name="qq" placeholder="请输入qq" id="qq" /><br> <input
			type="text" name="permission" placeholder="请输入管理员名字"
			lay-verify="permission" id="permission" /><br> <input
			type="button" value="注册" id="regBtn" />
	</form>
</body>
<script src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	$(function() {
		$("#regBtn").click(doRegist);
		alert("欢迎来到注册页面")
	})
	function doRegist() {
		var username = $("#username").val();
		var password = $("#password").val();
		var gender = $("input:radio[name='gender']:checked").val();
		var phone = $("#phone").val();
		var email = $("#email").val();
		var permission = $("#permission").val();
		var qq = $("#qq").val();
		　
		alert(username);
		alert(password);
		alert(gender);
		alert(phone);
		alert(email);
		alert(permission);

		var parm = {
			"username" : username,
			"password" : password,
			"gender" : gender,
			"phone" : phone,
			"email" : email,
			"permission" : permission,
			"qq" : qq
		}
		$.post("register", parm, function(result) {
			console.log(result)
		});

	}
	
	

</script>
</html>